#include <bits/stdc++.h>
using namespace std;

const int N = 4e3+50;

int t;
int n, m;
int a[N], b[N];

int k;

int trymin(int first, int second)
{
    return max(a[first+1], b[second+1]);
}

int trymax(int first, int second, int remain)
{
    int tans = trymin(first, second+remain);
    for (int i=1; i<=remain; ++i)
        tans = min(tans, trymin(first+i, second+remain-i));
    return tans;
}

int main(int argc, char const *argv[])
{
    scanf("%d", &t);
    for (int kk=0; kk<t; ++kk)
    {
        scanf("%d%d%d", &n, &m, &k);
        k = min(k, m-1);
        for (int i=1; i<=n; ++i)
        {
            scanf("%d", &a[i]);
            b[n-i+1] = a[i];
        }
        int ans = -1;
        for (int i=0; i<=k; ++i)
            ans = max(ans, trymax(i, k-i, m-1-k));
        printf("%d\n", ans);
    }    
    return 0;
}
